package com.runen.infinitemovement.adapter;

import android.content.Context;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.runen.infinitemovement.R;
import com.runen.infinitemovement.model.entity.InviteFriendsEntity;
import com.runen.infinitemovement.tool.GlideUtils;
import com.runen.infinitemovement.widget.imageview.RoundedCornersImage;
import com.runen.rxnetlibrary.utils.TimeUtil;

import java.util.List;

public class InviteFriendsAdapter extends BaseQuickAdapter<InviteFriendsEntity.DataBean, BaseViewHolder> {
    private Context context;

    public InviteFriendsAdapter(Context context) {
        super(R.layout.item_invite_friends);
        this.context = context;
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, InviteFriendsEntity.DataBean item) {
        RoundedCornersImage ecu_invite_header = helper.getView(R.id.ecu_invite_header);
        GlideUtils.loadImage(context,item.headImgUrl,ecu_invite_header);
        helper.setText(R.id.tv_invite_name, item.nickname);
        helper.setText(R.id.tv_invite_time, TimeUtil.dealDateFormat2(item.createTime));
    }
}
